# Contributor: 3nodeproblem <git@3n.anonaddy.com>
# Maintainer: 3nodeproblem <git@3n.anonaddy.com>
pkgname=authenticator-rs
pkgver=0.7.1
pkgrel=1
pkgdesc="TOTP MFA/2FA application written in Rust and GTK3"
url="https://github.com/grumlimited/authenticator-rs"
arch="x86_64 armv7 armhf aarch64 x86 ppc64le" # limited by rust and cargo
license="GPL-3.0-or-later"
subpackages="$pkgname-lang"
makedepends="
	cargo
	curl-dev
	gtk+3.0-dev
	meson
	openssl-dev
	sqlite-dev
	zlib-dev
	"
source="https://github.com/grumlimited/authenticator-rs/archive/refs/tags/$pkgver/authenticator-rs-$pkgver.tar.gz"
options="net !check" # No tests

# size optimisations
export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
export CARGO_PROFILE_RELEASE_LTO=true
export CARGO_PROFILE_RELEASE_OPT_LEVEL="s"
export CARGO_PROFILE_RELEASE_PANIC="abort"

build() {
	RELEASE_VERSION=$pkgver make release-version
	make release
}

package() {
	DESTDIR="$pkgdir" make install
}

sha512sums="
7480faf4b057f4af9d111a7a8c78d3b8c893ac2562e3dc5a2d70e2f3fe76a9d0ceefd24a0f8ffb75fc0a91d68cb528a36dd7fdc6613396bdaa3a9e53b8a5e0a4  authenticator-rs-0.7.1.tar.gz
"
